﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

// Reviewed
#pragma once
#include "GcmpModelInterface.h"
#include "IDbObject.h"

namespace gcmp
{
    class IParameterValueStorage;

    /// \brief 参数值显示字符串类
    class GCMP_MODEL_INTERFACE_EXPORT IParameterValueDisplayString : public IDbObject
    {
    public:
        DEFINE_CAST_DERIVED(gcmp::IParameterValueDisplayString, gcmp::IDbObject)

    public:
        /// \brief 创建参数值显示字符串类对象
        ///
        /// \param pParamValueStorage 参数值存储对象
        /// \param displayString      显示字符串
        /// \return 参数值显示字符串对象
        static OwnerPtr<IParameterValueDisplayString> CreateParameterValueDisplayString(OwnerPtr<IParameterValueStorage> pParamValueStorage, const std::wstring& displayString);

        /// \brief 返回参数值存储对象
        ///
        /// \return 返回参数值存储对象
        virtual const IParameterValueStorage* GetValue() const = 0;

        /// \brief 返回显示字符串
        ///
        /// \return 显示字符串
        virtual const std::wstring& GetDisplayString() const = 0;

        /// \brief 克隆当前参数值显示字符串类对象
        ///
        /// \return 参数值显示字符串对象
        virtual OwnerPtr<IParameterValueDisplayString> Clone() const = 0;
    };
}



